#!/usr/bin/perl

my @line = qw{a b c};
my $var1 = #line;
my $var2 = @line;
my $var3 = $#line;

print "var1 is $var1.\n" ;
print "var2 is $var2.\n" ;
print "var3 is $var3.\n" ;

for (my $i=0; $i < @line; $i++)
{
	print $line[$i];
}

print "\n";

for (my $i=0; $i < $#line + 1; $i++)
{
	print $line[$i];
}

#check push array into another array
#two-dimensions array
my @array1 = qw{a, b, c};
my @array2 = qw{1, 2, 3};
my @array = ();
push @array, \@array1;
push @array, \@array2; 

print "\n@array\n";

checkArray(@array);

sub checkArray
{
	my (@array) = @_;
	print "@array\n";
}

